<div id="page-{{page.id}}" data-id={{page.id}} data-type={{page.contentType}}>
	{{#if editMode}}
		<div class="wysiwyg">
			{{document/document-editor
				document=document
				folder=folder
				page=editPage
				meta=editMeta
				attachments=attachments
				onCancel=(action "onCancelEdit")
				onAction=(action "onSavePage")}}
		</div>
	{{else}}
		<div class={{page.tocIndentCss}}>
			{{document/page-heading
				expanded=expanded
				page=page
				meta=meta
				pages=pages
				roles=roles
				folder=folder
				folders=folders
				blocks=blocks
				tabMode=tabMode
				pending=pending
				document=document
				permissions=permissions
				currentPageId=currentPageId
				onEdit=(action "onEdit")
				refresh=(action refresh)
				onExpand=(action onExpand)
				onCopyPage=(action "onCopyPage")
				onMovePage=(action "onMovePage")
				onDeletePage=(action "onDeletePage")
				onSavePageAsBlock=(action "onSavePageAsBlock")
				onPageLevelChange=(action onPageLevelChange)
				onPageSequenceChange=(action onPageSequenceChange)
				onShowSectionWizard=(action onShowSectionWizard)}}

			{{#if expanded}}
				<div class="wysiwyg">
					{{section/base-renderer page=page}}
				</div>
			{{/if}}
		</div>
	{{/if}}

	{{document/section-attachment uploadLabel="Upload Attachments"
		editMode=editMode page=page document=document files=attachments
		onAttachmentUpload=(action onAttachmentUpload)
		onAttachmentDelete=(action onAttachmentDelete)}}
</div>
